package com.hctforgreen.greenservice.model;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * 会员积分
 * 
 * @author denghb
 * 
 */
public class PersonPotinsEntity extends BaseEntity {
	private static final long serialVersionUID = 490472138337484883L;
	public String rank = "";
	public String rating = "";
	public String points = "";

	public String addPoints = "";
	public String statusCode = "";
	public String msg = "";

	public static PersonPotinsEntity parse(JSONObject jsonObject)
			throws JSONException {
		PersonPotinsEntity entity = new PersonPotinsEntity();
		if (jsonObject == null) {
			return entity;
		}
		if (jsonObject.has("rank")) {
			entity.rank = jsonObject.getString("rank");
		}

		if (jsonObject.has("rating")) {
			entity.rating = jsonObject.getString("rating");
		}

		if (jsonObject.has("points")) {
			entity.points = jsonObject.getString("points");
		}

		if (jsonObject.has("statusCode")) {
			entity.statusCode = jsonObject.getString("statusCode");
		}
		if (jsonObject.has("addPoints")) {
			entity.addPoints = jsonObject.getString("addPoints");
		}

		if (jsonObject.has("msg")) {
			entity.msg = jsonObject.getString("msg");
		}
		return entity;

	}

}
